# Piotr Jastrzebski
# Marcin Nazimek

source('src/utils/log.r')


test4 <- read.csv('data/testBase.txt', head=FALSE, sep = ",", dec=".")

cls = test4$V5
#print(cls)
a <- (cls)
#for(i in 1:100) {
#	if(cls[i] == 1)
#		a[i]=as.factor(c("setosa"))
#	if(cls[i] == 0)
#		a[i]=as.factor(c("versicolor"))
	#print("false")
#}
fdata = factor(cls)
test4$V5  <- fdata


#test4$V5=a
print(test4$V5)
summary(test4)
attributes(test4)
class(test4$V5)
test4$V5
test = test4[ c(1:10, 41:60, 91:100), ]
train = test4[ c(11:40, 61:90), ]

test
train
#colnames(train)=names(iris2)
#colnames(test)=names(iris2)

#trainSet2<- data.frame(train)
#testSet2<- data.frame(test)

r = randomForest(V5 ~., data=test, importance=TRUE, do.trace=100)	